package com.pwser.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.pwser.async.AsyncService;

@RestController
@RequestMapping("/async")
public class AsyncController {
	@Autowired
	private AsyncService asyncService;
	@Value("${my.domain}")
	private String domain;

	@RequestMapping("/index")
	public String index() throws Exception {
		System.out.println("#####异步测试#####--1");
		asyncService.test();
		System.out.println("#####异步测试#####--2");
		return domain;
	}

}
